package com.ai.bitcoin.redis.service;

import com.ai.bitcoin.jpa.entity.BccAnnoInfoCrawl;
import com.ai.bitcoin.jpa.entity.BccNews;
import com.ai.bitcoin.vo.HtmlReportGenerateVO;
import com.ai.bitcoin.vo.Price2BccVo;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import java.util.List;

public interface BccRedisService {


    public void cacheHomePageNum2Redis(String type, String nextVersion, int pageSize);

    public void cacheBccCount2Redis(String type, String nextVersion, long total);

    public String getBccCount(String type);

    public void cacheRank2Redis(String rankType, String bccId, String version, JSONObject value);

    public void cacheDetail2Redis(String bccId, String version, JSONObject value);

    public void cacheRankPage(String rankType, int pageSize, int pageNum, String version, JSONArray show);

    public String getRankPage(String rankType, int pageSize, int pageNum);

    public String getRankKey(String rankType, int pageSize, int pageNum);

    public String getRank(String rankType, String bccId);

    public void cacheTop2Redis(String version, JSONObject value);

    public void cacheBasic2Redis(String bccId, JSONObject value);

    public void cacheBccList2Redis(JSONArray list);

    public String getBccList();

    public void cacheDayPrice(String bccId, JSONObject value);

    public String getBasicInfo(String bccId);

    public void cacheCurrentPrice2Redis(String bccId, JSONObject value);

    public void cache24hPrice2Redis(String bccId, JSONObject value);

    public void cacheReportDetail2Redis(String bccId, JSONObject value);

    public String getReportDetail(String bccId);

    public void cover24hPrice2Redis(String bccId, JSONArray value);

    public void coverTodayPrice2Redis(String bccId, JSONArray value);

    public String get24hPrice(String bccId);

    public void updateVersion(String type, String newVersion);

    public String getNextVersion(String type);

    public String getCurrentVersion(String type);


    public String getTop();

    public String getHomePageNum(String rankType);

    public void put(String key, String value);

    public String get(String key);

    public String getCurrentPrice(String bccId);

    public String getTodayPrice(String bccId);

    public String getDayPrice(String bccId);

    public void addTodayPriceNode(String bccId, JSONObject node);

    public void addDayPriceNode(String bccId, JSONObject node);

    public void addTodayPriceNodeList(String bccId, JSONArray nodeList);

    public void addDayPriceNodeList(String bccId, JSONArray nodeList);

    public void deleteDayPrice(String bccId);

    public String getTime(String type);

    public void setTime(String type, String time);

    public boolean dayUpdate(String type);

    public JSONObject getReport(String bccId);

    public void cacheDigestNews(JSONArray jsonArray);

    public String getDigestNews();

    public void cacheNews(String id, JSONObject jsonObject);

    public String getNews(String id);

    void cache2BitCoinReport(String bccId, HtmlReportGenerateVO reportGenerateVO);

    HtmlReportGenerateVO getBitCoinReport(String key);

    void cache2BitCoinBccNews(String bccId, List<BccNews> bccNewsList);

    List<BccNews> getBitCoinBccNews(String key);

    void cache2SingleBccNew(String bccId, String newsId, BccNews bccNews);

    BccNews getSingleBccNew(String key);

    void cache2SingleBccAnnoInfo(String bccId, String annoId, BccAnnoInfoCrawl infoCrawl);

    BccAnnoInfoCrawl getSingleBccAnnoInfo(String key);

    void cache2SinglePrice2BccVo(String bccId, Price2BccVo price2BccVo);

    Price2BccVo getSinglePrice2BccVo(String key);
}
